SpreadJS Documentation
Set the Text Indentation
SpreadJS Documentation > Developer's Guide > Managing the User Interface > Working with Cell Types > Setting a Hyperlink Cell > Set the Text Indentation

In a hyperlink cell, you can set text indentation for the hypertext. 

The image shared below displays text indentation in a hyperlink cell.

Using Code

The following code sets the textIndent for the hyperlink in a hyperlink cell.

JavaScript
Copy Code

// Set the textIndent in the hyperlink cell

spread.getSheet(0).getCell(1, 1).textIndent(3);

The table shared below describes how the Horizontal alignment and Text indentation work concurrently in a hyperlink cell:

HorizontalAlignment

                                                                 TextIndent

Left

Increasing Indent value in the textIndent moves the hyperlink text one tab width to the right.

Center

The hyperlink text will be centered.

Right

Increasing Indent value in the textIndent moves the hyperlink text one tab width to the left.